<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link href="https://cdn.jsdelivr.net/npm/animate.css@3.5.1" rel="stylesheet" type="text/css">
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <style>
     .box {
      width: 150px;
      height: 150px;
      background: yellowgreen;
    }
  </style>
</head>
<body>
  <div id="app">

    <button @click="isShow=!isShow">显示/隐藏</button>
    <transition 
    enter-active-class="animated tada"
    leave-active-class="animated bounceOutRight"
    >
      <div class="box" v-if='isShow'>
      </div>
    </transition>



  </div>

  <script>

    var vm = new Vue({
      el: '#app',
      data:{
        isShow:true
      }
    })
  </script>
</body>
</html>